<template>
  <swiper class="swiper" autoplay indicator-dots circular>
    <swiper-item v-for="item in images" :key="item.id">
      <view class="swiper-item uni-bg-red" >
        <image :src="item.imgUrl" style="width: 100vw"/></view>
    </swiper-item>
  </swiper>
</template>

<script setup>
import { getSlideshow } from "@/api/home";
import { onMounted, ref } from "vue";
const images = ref([]);
onMounted(async () => {
  const res = await getSlideshow(); // 发起获取图片请求
  images.value = res.result;
});
</script>

<style >
.swiper{
  height: 200px;
}
</style>